<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>   
<script type="text/javascript">
function mg_savepayversionability(type)
{
	var f = 0; 
	var code_Values = document.getElementsByTagName("input"); 
	for(i = 0;i < code_Values.length;i++){ 
		if(code_Values[i].type == "checkbox") 
		{ 
			if(code_Values[i].checked == true)
			{
				f = 1;
			} 
		} 
	} 

	if(f ==0)
    {
	    alert('请选择支付能力！');
	    return false;
    }  
	
    if (!confirm("确定继续？"))
    {
        return false;
    }
    var url = "mg/payversionability/save.do?type=" + type;
    var objectid = "content";
    postXMLHttpRequest(url, "myform", objectid); 
}
</script>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>   
  <form id="myform" name="myform"
        method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="3">
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right">
              <img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="25" colspan="3" class="table_blue">
        <strong><img src="images/dot.jpg" width="13" height="9">支付版本能力信息</strong>
        <input type="hidden" id="model.payversionid" name="model.payversionid"  value="<s:property value="model.payversionid" />" />
        </td>
    </tr> 
    <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;支付版本：</td>
      <td class="table_w2" colspan="2">&nbsp;
      	<s:property value="payversion.versionname"/>(<s:property value="payversion.versioncode"/>)
      </td>
    </tr>
     <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;SDK：</td>
      <td class="table_w2" colspan="2">
      	<s:iterator value="sdklist" status="stat">
      	<br/>
      	&nbsp;<input type="checkbox" id="payid" name="payid"
      	 <s:iterator value="list" status="stat1">
      	 	<s:if test="sdklist.get(#stat.index).id==paysdkid"> checked </s:if>
      	 </s:iterator>
      	 value="sms_<s:property value="id"/>">&nbsp;<s:property value="sdkname"/>(<s:property value="companyname"/>)
      	<br/>
      	</s:iterator>
      	&nbsp;
      </td>
    </tr>
    <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;三方支付：</td>
      <td class="table_w2" colspan="2">&nbsp;
      	<s:iterator value="threepaylist" status="stat">
      	<br/>
      	&nbsp;<input type="checkbox" id="payid" name="payid"
      	 <s:iterator value="list" status="stat1">
      	 	<s:if test="sdklist.get(#stat.index).id==paysdkid"> checked </s:if>
      	 </s:iterator>
      	 value="three_<s:property value="id"/>">&nbsp;<s:property value="threepayname"/>(<s:property value="companyname"/>)
      	<br/>
      	</s:iterator>
      	&nbsp;
      </td>
    </tr>
    <tr>
      <td colspan="3" class="table_w1" align="center">
        <button id="btn2" dojoType="dijit.form.Button"
            onclick="mg_savepayversionability('update');">保存</button>
        &nbsp;&nbsp;        
        <button id="btn3" dojoType="dijit.form.Button"
            onclick="mg_savethreepayproviders('delete');">返回</button>
      </td>      
    </tr>
    <tr> 
      <td colspan="3" background="images/table_bom_bg.jpg">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/table_bom_left.jpg" width="20" height="15"></td>
          <td></td>
          <td align="right">
            <img src="images/table_bom_right.jpg" width="20" height="15"></td>
        </tr>
        </table>
      </td>
    </tr>
  </table>  
  </form>
  </td>
  <td width="5"></td>
  </tr>
  </table>